{% extends "sklad/base.html" %}
{% block title %}{{ title|escape }}{% endblock %}
{% block content %}
<div id="main">

{% block tree %}
<div id="contentleft">
<h3>Категории</h3>
<p class="item_menu"><a href="{% url category_create item.id %}">Добавить</a></p>

<div id="catlist">
{% for item in cattree %}
  <div class="catitem">
    <samp>
	  <a href=""><img src="{% load media %}{% media_prefix %}img/icon_deletelink.gif" width="10" height="10" title="Удалить категорию {{ item.name }}"></a>
	  <a href="{% url category_edit item.id %}"><img src="{% media_prefix %}img/icon_changelink.gif" width="10" height="10" title="Изменить категорию {{ item.name }}"></a>
    </samp>
    <samp style="padding-left: {{ item.csslevel }}px">
	{% if item.expanded %}	
	    {% if item.child_present %}
			<a href="{% url category_collaps item.id %}">
	        <img src="{% media_prefix %}img/minus.gif" width="9" height="9"></a>
	    {% else %}
            <img src="{% media_prefix %}img/rect.gif" width="9" height="9">
	    {% endif %}		
	{% else %}
		{% if item.child_present %}
		    <a href="{% url category_expand item.id %}">
	        <img src="{% media_prefix %}img/plus.gif" width="9" height="9"></a>
	    {% else %}
            <img src="{% media_prefix %}img/rect.gif" width="9" height="9">
	    {% endif %}		
	{% endif %}
    {% ifequal item.id currentcategory %}<b>{% endifequal %}
       <a href="{% url category_view item.id %}">{{ item.name }}</a>
    {% ifequal item.id currentcategory %}</b>{% endifequal %}</samp>
  </div>
{% endfor %}
</div>
</div>
{% endblock %}

<div id="contentright">
{% block list %}
<h3>Наличие комплектующих на складе</h3>
{% endblock %}
</div>

</div>
{% endblock %}
